﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SeaBattle.Models
{
    public abstract class Ship
    {
        public abstract string Name { get; }
        public ICollection<Coordinate> Coordinates { get; set; }

        public bool IsDestroyed
        {
            get 
            {
                return Coordinates.Count(o => o.IsHit) == Coordinates.Count();
            }
        }
    }
}